<?php
include "jssdk_wx.php";
	$url = urldecode($_POST["url"]);
 	$appid = '微信公众号的APPID';
 	$appsecret = '安全密钥';
	$jssdk = new JSSDK($appid, $appsecret, $url);
	$signPackage = $jssdk->GetSignPackage();
	$appId = $signPackage['appId'];
	$timestamp = $signPackage['timestamp'];
	$nonceStr = $signPackage['nonceStr'];
	$signature = $signPackage['signature'];
	$surl = $signPackage['url'];
	$data = array("appId"=>$appId,"timestamp"=>$timestamp,"nonceStr"=>$nonceStr,"signature"=>$signature,"surl"=>$surl); //返回给前端的数据
    //var_dump($trans_data);
	echo json_encode($data,true);

 
